home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_14487.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  28 lines

  1. -- card: 14487 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. be accessed only by sending messages to the object, since this results in MODULAR program design.  (C++ offers 'private' and 'protected' declarations which helps the programmer enforce this*.)  This allows the programmer to later change the implementation of the instance variables without affecting the functions which access objects of this class.  This in turn improves code maintainability and reusability, a goal of OOP languages.
  11.  
  12. Note that it is possible to modularize C programs even without TC or C++ style classes, by considering each source file to define a unique class and by using variables with     "file" scope.  More significant advantages of the TC/C++ language are developed in the next section.
  13.  
  14. -- part contents for background part 7
  15. ----- text -----
  16. 36
  17.  
  18. -- part contents for background part 29
  19. ----- text -----
  20. 40401
  21.  
  22. -- part contents for background part 27
  23. ----- text -----
  24. C++ custom scopes
  25.  
  26. -- part contents for background part 20
  27. ----- text -----
  28. C++ custom scopes - p112